/*
 * Hero.h
 * Models a "Hero" (user-playable character).
 *
 * To start off with, a Hero will be visble on the screen, and can
 * move around anywhere he likes within the World extents.
 */

#ifndef __HERO_H
#define __HERO_H

#include <string>
#include "common.h" 
#include <time.h>

class Hero {
	public:
		Hero();
		~Hero();

		// Hero draws himself onto the screen at his
		// current x, y location.
		void paint();

	private:
		// The image we use to represent the hero.
		CL_Surface 	*sprite_image_1;
		CL_Surface 	*sprite_image_2;

		// Hero's current location.
		int		x, y;
		int		w, h;
		static const int	speed_x = 5;
		static const int	speed_y = 2;

		// Handles double click events ("whistles")
		time_t 		last_whistle;

		CL_Slot		mouseMoveSlot;
		CL_Slot		mouseClickSlot;

		// Just for kicks, we'll make the Hero
		// chase the mouse.
		void		mouseMovement(const CL_InputEvent&);
		void		moveHero();

		void		mouseClick(const CL_InputEvent&);

		// Flip this character horizontally.
		int		look_left;
};

#endif
